package com.edu.controller;

import com.edu.api.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ProjectName: myApp
 * @Titile: UserController
 * @Author: Administrator
 * @Description: TODO
 */
@RestController
@RequestMapping("/api/user")
public class UserController {
    //注入OpenFeign的客户端
    @Autowired
    private UserFeignClient userFeignClient;

    @GetMapping("orders")
    public Object getOrderList(){
        return userFeignClient.getOrderList();
    }

    @GetMapping("login")
    public String login(){
        return "访问了登录";
    }

}
